package com.citywithincity.db.data2db;

import java.io.StringReader;
import java.sql.PreparedStatement;
import java.sql.SQLException;

import com.citywithincity.db.interfaces.IPsSetter;

class String2Clob implements IPsSetter {


	@Override
	public void setValue(PreparedStatement ps, int index, Object value) throws SQLException {
		if(value==null){
			ps.setObject(index, null);
		}else{
			String string = (String) value;
			ps.setCharacterStream(index,  new StringReader(string), string.length());
		}
	}

}
